import java.util.Scanner;

public class test3 {
    //输出一个整数的每一位
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数:");
        int a;
        for (int i = 0; ; i++) {
            a = sc.nextInt();
            if(a<0){
                System.out.println("输入错误,请重新输入!");
                i--;
            }else{
                break;
            }
        }
        System.out.println("输出为:");
        for (int i = 0; ; i++) {
            int b = 0;
            b = a%10;
            a = a/10;
            System.out.print(b+" ");
            if(a%10==0){
                break;
            }
        }

    }
}
